<form id="addOrUpdateForm" lay-filter="addOrUpdateForm" class="layui-form model-form" >


  <div class="layui-form-item">
    <label class="layui-form-label layui-form-required">充值金额</label>
    <div class="layui-input-block">
      <input name="money" class="layui-input" placeholder="" lay-verType="tips" required/>
    </div>
  </div>

  <div class="layui-form-item text-right">
    <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
    <button class="layui-btn" lay-filter="chongzhi" lay-submit>保存</button>
  </div>

</form>
<script>
  layui.use(['layer', 'form', 'admin', 'xnUtil', 'xmSelect', 'laydate'], function () {
    var $ = layui.jquery;
    var layer = layui.layer;
    var form = layui.form;
    var admin = layui.admin;

    /* 监听表单提交 */
    form.on('submit(chongzhi)', function (data) {
      admin.req(getProjectUrl() + 'order/chongzhi', data.field, function (res) {
        layer.msg("充值成功", {icon: 1, time: 1000}, function () {

          admin.putLayerData('formOk', true, '#addOrUpdateForm');
          admin.closeDialog('#addOrUpdateForm');
        });
      }, 'post');
      return false;
    });
  });
</script>